package com.ly.demo.weixin.ienum;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Peizhen Sun/meighen
 * @since 2023/6/15 14:45
 */
@Getter
@AllArgsConstructor
public enum WxCodeEnum {
    PARAM_ERROR(460, "请求参数错误"),
    REQUEST_REMOTE_CALL_ERROR(530, "远程调用失败"),

    SYSTEM_ERROR(10001, "系统错误"),
    BUSINESS_ERROR(10002, "业务校验错误"),
    THIRD_ERROR(10003, "网络繁忙，请重试"),

    USER_NOT_EXIST_ERROR(10004, "用户不存在"),
    MOBILE_EXIST_ERROR(10005, "手机号已被占用"),

    AUTH_ACCESS_KEY_NOT_EXIST_ERROR(10006, "授权码不存在"),
    AUTH_FAIL_ERROR(10007, "授权失败"),
    USER_DISABLE(10008, "用户已禁用"),
    USER_PACKAGE_EXPIRE(10009, "用户权益过期"),
    USER_PACKAGE_NO_OPEN(10010, "用户权益未开通"),


    /**
     * 微信登录
     */
    WEIXIN_LOGIN_ERROR(20001, "小程序登录失败"),
    /**
     * 获取小程序授权凭证失败
     */
    WEIXIN_GET_ACCESS_TOKEN_ERROR(20002, "获取小程序授权凭证失败"),

    ;

    private int code;
    private String desc;
}
